<%--

    Copyright (C) 2007-2011 JUG Events Team <info@jugevents.org>

    This file is part of JUG Events Web Application.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

--%>

<%@ include file="common.jspf" %>


<%-- this form-login-page form is also used as the form-error-page to ask for a login again. --%>
<div id="loginBox">
    <div id="loginTitle"><spring:message code="loginTitle"/></div>
    <div id="loginMessageBox">
        <c:if test="${not empty param.login_error}">
            <font color="red">
                <spring:message code="login.error"/>
            </font>
        </c:if>
    </div>
    <form id="loginForm" action="<c:url value='${cp}/security_check'/>" method="post">
        <dl>
            <dt><label class="loginLabel" for="username"><spring:message code="username"/></label></dt>
            <%-- removed <c:if test="${not empty param.login_error}">value='<%= session.getAttribute(AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY)%>'</c:if> --%>	
            <dd><input id="username" class="loginField" type='text' name='j_username' tabindex="1" /></dd>
            <dt><label class="loginLabel" for="password"><spring:message code="password"/></label></dt>
            <dd><input id="password" class="loginField" type='password' name='j_password' tabindex="2"/></dd>
            <dt><label class="loginLabel" for="remember">&nbsp;</label></dt>
            <dd><input id="remember" type="checkbox" name="_spring_security_remember_me" tabindex="3"/> <spring:message code="remember_me"/></dd>
            <dt><label class="loginLabel" for="submit">&nbsp;</label></dt>
            <dd><input id="submit" name="submit" type="submit" value="<spring:message code='sign_in'/>" tabindex="4"/></dd>
        </dl>
    </form>
    <h1>Or, Sign in with Google</h1>
    
    <form action="<c:url value='${cp}/j_spring_openid_security_check'/>" method="post">
			<input name="openid_identifier" size="50" maxlength="100" type="hidden" value="https://www.google.com/accounts/o8/id"/>
			<br />
			<input type="submit" value="Sign in with Google"/>
	</form>
    
    <div id="registerMessage">
        <spring:message code="dontHaveAccount"/> <a href="${cp}/jugger/registration.form"><spring:message code="registerYou"/></a>
    </div>
    <br/>
    <br/>
    <div id="forgotPassword">
        <spring:message code="forgotPassword"/> <a href="${cp}/passwordRecovery.form"><spring:message code="Recover"/></a>
    </div>
</div>
